﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>CSS - Positioning</title>
    <script src="script/jquery-1.3.2.js" type="text/javascript"></script>
    <script language="javascript" type="text/javascript">
        $(document).ready(function() {
            var p = $("p:last");
            var offset = p.offset();
            p.html("left: " + offset.left + ", top: " + offset.top);
            var div = $("div");
            var divOffset = div.offset();
            div.html("left: " + divOffset.left + ", top: " + divOffset.top);
        });
    </script>
    <style type="text/css">
    div
    {
        width:200px;
        height:30px;
        border:dashed 1px #000;
    }
    </style>
</head>
<body>
    <p>Hello</p>
    <p>Hello</p>
    <p>2nd Paragraph</p>
    <div style="position:absolute;top:32px;left:300px">test</div>
</body>
</html>
